# Author:	gong_libin
# Date:		2016_06_01

CC ?= g++
CFLAGS ?= -Wall -fPIC

GLB_ENV ?= $(shell pwd)/../..
GLB_INC ?= $(GLB_ENV)/inc
GLB_SRC ?= $(GLB_ENV)/src
GLB_OBJ ?= $(GLB_SRC)/GlbObj

OBJECTS =				\
	GlbNet.o			\
	GlbRaw.o			\
	GlbUdp.o			\
	GlbTcp.o			\
	GlbPro.o			\
	GlbEpoll.o			\
	GlbMulti.o			\
	GlbDgram.o			\
	GlbStream.o

all: $(OBJECTS) install

$(OBJECTS): %.o: %.cpp
	$(CC) -c $(CFLAGS) -I$(GLB_INC) $< -o $@

install:
	cp $(OBJECTS) $(GLB_OBJ)/.

clean:
	rm -rf $(OBJECTS)
